<template>
	<view class="container" style="background-color: #eeeeee;">

		<view class="padding-lg">
			<view class="text-lg padding-bottom-sm text-left">{{articleInfo.username}}:</view>
			<u--textarea v-model="articleInfo.content" placeholder="我的反馈内容" autoHeight disabled></u--textarea>
			<view class="cu-tips text-gray text-right">{{ articleInfo.create_time }}</view>
		</view>
		
		<view class="text-left padding-lg solid-top">
			<view class="text-lg padding-bottom-sm text-left">回复:</view>
			<view v-if="articleInfo.reply_content == null">暂无回复</view>
			<view v-else>
			<u--textarea v-model="articleInfo.reply_content" placeholder="回复内容" autoHeight disabled></u--textarea>
			<view class="cu-tips text-gray text-right">{{ articleInfo.update_time }}</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	import uParse from '@/components/u-parse/u-parse.vue';
	export default {
		components: {
			uParse
		},
		data() {
			return {
				article_id:0,
				articleInfo:[],
				classifyInfo:[],
				imageProp:{}
			};
		},
		onLoad: function (option) {
			this.imageProp = {'mode':'aspectFit','domain':this.weburl};
			this.article_id = option.id;
			this.helper.checkLogin();
			this.getData();
		},
		methods: {
			getData:function(){
				//获取基础参数
				// uni.showLoading({
				// 	title:"数据加载中",
				// 	mask:true
				// })
				let id = this.article_id;
				let timestamp = this.helper.now();
				let sign = this.helper.setSign(['id='+id,'timestamp='+timestamp]);
				this.helper.req({
					api:"getMsg",
					timestamp:timestamp,
					data:{id:id},
					header:{sign:sign},
					method:'GET',
				}).then(res=>{
					this.classifyInfo = res.data.data.classifyInfo;
					this.articleInfo = res.data.data.msginfo;

					uni.setNavigationBarTitle({
						title: '我的反馈'
					});
					
					uni.hideLoading();
				})
			},
		},
	};
</script>

<style lang="scss">
	page {
		background-color: #0D1A44;
		
	}
	.container {
		width: 100%;
		height: 100%;
		overflow: hidden;
	}
	.container {
	    display: -webkit-box;
	    display: -webkit-flex;
	    display: flex;
	    -webkit-box-orient: vertical;
	    -webkit-box-direction: normal;
	    -webkit-flex-direction: column;
	    flex-direction: column;
	    height: 100%;
	    background: #fff;
	}
</style>
